home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Gobby 0.4.7 / gobby-0.4.7.exe / {app} / share / gtksourceview-2.0 / language-specs / eiffel.lang < prev    next >
Extensible Markup Language  |  2008-09-09  |  9KB  |  277 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.  
  4.  Author: Hasan Karahan <hasan.karahan81@gmail.com>
  5.  Copyright (C) 2008 Hasan Karahan <hasan.karahan81@gmail.com>
  6.  
  7.  This library is free software; you can redistribute it and/or
  8.  modify it under the terms of the GNU Library General Public
  9.  License as published by the Free Software Foundation; either
  10.  version 2 of the License, or (at your option) any later version.
  11.  
  12.  This library is distributed in the hope that it will be useful,
  13.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  Library General Public License for more details.
  16.  
  17.  You should have received a copy of the GNU Library General Public
  18.  License along with this library; if not, write to the
  19.  Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  Boston, MA 02111-1307, USA.
  21.  
  22. -->
  23.  
  24. <language id="eiffel" _name="Eiffel" version="2.0" _section="Sources">
  25.  
  26.   <metadata>
  27.     <property name="mimetypes">text/x-eiffel</property>
  28.     <property name="globs">*.e;*.eif</property>
  29.     <property name="line-comment-start">--</property>
  30.   </metadata>
  31.  
  32.   <styles>
  33.     <style id="comment" _name="Comment" map-to="def:comment"/>
  34.     <style id="string" _name="String" map-to="def:string"/>
  35.     <style id="debug" _name="Debug" map-to="def:preprocessor"/>
  36.     <style id="assertion" _name="Assertion" map-to="def:preprocessor"/>
  37.     <style id="keyword" _name="Keyword" map-to="def:keyword"/>
  38.     <style id="type" _name="Data Type" map-to="def:type"/>
  39.     <style id="design-by-contract" _name="Design by Contract" map-to="def:keyword"/>
  40.     <style id="exception-handling" _name="Exception Handling" map-to="def:keyword"/>
  41.     <style id="predefined-variable" _name="Predefined Variable" map-to="def:builtin"/>
  42.     <style id="void" _name="Void Value" map-to="def:special-constant"/>
  43.     <style id="boolean" _name="Boolean Value" map-to="def:boolean"/>
  44.     <style id="decimal" _name="Decimal number" map-to="def:decimal"/>
  45.     <style id="hexadecimal" _name="Hexadecimal number" map-to="def:base-n-integer"/>
  46.   </styles>
  47.  
  48.   <default-regex-options case-sensitive="false"/>
  49.  
  50.   <definitions>
  51.  
  52.     <context id="single-quoted-string" style-ref="string">
  53.       <start>'</start>
  54.       <end>'</end>
  55.     </context>
  56.  
  57.     <context id="double-quoted-string" style-ref="string">
  58.       <start>"</start>
  59.       <end>"</end>
  60.     </context>
  61.  
  62.     <context id="line-comment" style-ref="comment" end-at-line-end="true">
  63.       <start>--</start>
  64.       <include>
  65.         <context ref="def:in-comment"/>
  66.       </include>
  67.     </context>
  68.  
  69.     <context id="debug" style-ref="debug">
  70.       <start>debug</start>
  71.       <end>end</end>
  72.     </context>
  73.  
  74.     <context id="assertion" style-ref="assertion">
  75.       <start>check</start>
  76.       <end>end</end>
  77.     </context>
  78.  
  79.     <context id="keywords" style-ref="keyword">
  80.  
  81.       <!-- class declaration -->
  82.       <keyword>indexing</keyword>
  83.       <keyword>deferred</keyword>
  84.       <keyword>expanded</keyword>
  85.       <keyword>class</keyword>
  86.       <keyword>obsolete</keyword>
  87.       <keyword>inherit</keyword>
  88.  
  89.       <!-- parent list -->
  90.       <keyword>rename</keyword>
  91.       <keyword>as</keyword>
  92.       <keyword>export</keyword>
  93.       <keyword>all</keyword>
  94.       <keyword>undefine</keyword>
  95.       <keyword>redefine</keyword>
  96.       <keyword>select</keyword>
  97.       <keyword>end</keyword>
  98.       <keyword>(create|creation)</keyword>
  99.       <keyword>feature</keyword>
  100.  
  101.       <!-- feature declaration -->
  102.       <keyword>frozen</keyword>
  103.       <keyword>prefix</keyword>
  104.       <keyword>infix</keyword>
  105.       <keyword>is</keyword>
  106.  
  107.       <!-- routine -->
  108.       <keyword>obsolete</keyword>
  109.       <keyword>require+(\s+else)</keyword>
  110.       <keyword>local</keyword>
  111.  
  112.       <!-- routine body -->
  113.       <keyword>deferred</keyword>
  114.       <keyword>do</keyword>
  115.       <keyword>once</keyword>
  116.       <keyword>external</keyword>
  117.       <keyword>alias</keyword>
  118.       <keyword>ensure+(\s+then)</keyword>
  119.       <keyword>rescue</keyword>
  120.       <keyword>end</keyword>
  121.       <keyword>unique</keyword>
  122.       <keyword>invariant</keyword>
  123.       <keyword>end</keyword>
  124.  
  125.       <!-- binary -->
  126.       <keyword>and+(\s+then)</keyword>
  127.       <keyword>or+(\s+else)</keyword>
  128.       <keyword>xor</keyword>
  129.       <keyword>implies</keyword>
  130.  
  131.       <!-- unary -->
  132.       <keyword>not</keyword>
  133.  
  134.       <!-- instruction -->
  135.       <keyword>retry</keyword>
  136.       <keyword>if</keyword>
  137.       <keyword>then</keyword>
  138.       <keyword>elseif</keyword>
  139.       <keyword>else</keyword>
  140.       <keyword>end</keyword>
  141.       <keyword>inspect</keyword>
  142.       <keyword>when</keyword>
  143.       <keyword>then</keyword>
  144.       <keyword>end</keyword>
  145.  
  146.       <!-- loop -->
  147.       <keyword>from</keyword>
  148.       <keyword>invariant</keyword>
  149.       <keyword>variant</keyword>
  150.       <keyword>until</keyword>
  151.       <keyword>loop</keyword>
  152.       <keyword>do</keyword>
  153.       <keyword>end</keyword>
  154.  
  155.       <!-- expression -->
  156.       <keyword>strip</keyword>
  157.       <keyword>old</keyword>
  158.  
  159.       <!-- type -->
  160.       <keyword>separate</keyword>
  161.       <keyword>expanded</keyword>
  162.       <keyword>like</keyword>
  163.     </context>
  164.  
  165.     <context id="predefined-variables" style-ref="predefined-variable">
  166.       <keyword>Current</keyword>
  167.       <keyword>Precursor</keyword>
  168.       <keyword>Result</keyword>
  169.     </context>
  170.  
  171.     <context id="builtin-types" style-ref="type">
  172.       <keyword>CHARACTER</keyword>
  173.       <keyword>STRING</keyword>
  174.       <keyword>BIT</keyword>
  175.       <keyword>BOOLEAN</keyword>
  176.       <keyword>INTEGER</keyword>
  177.       <keyword>REAL</keyword>
  178.       <keyword>NONE</keyword>
  179.       <keyword>ANY</keyword>
  180.     </context>
  181.  
  182.     <context id="lib-eiffel-base" style-ref="type">
  183.       <keyword>ACTIVE</keyword>
  184.       <keyword>ARRAYED_LIST_CURSOR</keyword>
  185.       <keyword>ARRAYED_LIST</keyword>
  186.       <keyword>ARRAYED_STACK</keyword>
  187.       <keyword>BILINEAR</keyword>
  188.       <keyword>BI_LINKABLE</keyword>
  189.       <keyword>CELL</keyword>
  190.       <keyword>CONTAINER</keyword>
  191.       <keyword>COUNTABLE</keyword>
  192.       <keyword>CURSOR</keyword>
  193.       <keyword>DYNAMIC_LIST</keyword>
  194.       <keyword>HASH_TABLE_CURSOR</keyword>
  195.       <keyword>HASH_TABLE</keyword>
  196.       <keyword>INDEXABLE</keyword>
  197.       <keyword>LINEAR</keyword>
  198.       <keyword>LINKABLE</keyword>
  199.       <keyword>LINKED_LIST_CURSOR</keyword>
  200.       <keyword>LINKED_LIST</keyword>
  201.       <keyword>LINKED_QUEUE</keyword>
  202.       <keyword>LINKED_STACK</keyword>
  203.       <keyword>LIST</keyword>
  204.       <keyword>QUEUE</keyword>
  205.       <keyword>RESIZABLE</keyword>
  206.       <keyword>SEQUENCE</keyword>
  207.       <keyword>SET</keyword>
  208.       <keyword>STACK</keyword>
  209.       <keyword>TWO_WAY_LIST_CURSOR</keyword>
  210.       <keyword>TWO_WAY_LIST</keyword>
  211.       <keyword>UNBOUNDED</keyword>
  212.     </context>
  213.  
  214.     <context id="lib-eiffel-time" style-ref="type">
  215.       <keyword>ABSOLUTE</keyword>
  216.       <keyword>DATE_CONSTANTS</keyword>
  217.       <keyword>DATE_DURATION</keyword>
  218.       <keyword>DATE</keyword>
  219.       <keyword>DATE_TIME_CONSTANTS</keyword>
  220.       <keyword>DATE_TIME_DURATION</keyword>
  221.       <keyword>DATE_TIME</keyword>
  222.       <keyword>DATE_TIME_VALUE</keyword>
  223.       <keyword>DATE_VALUE</keyword>
  224.       <keyword>DURATION</keyword>
  225.       <keyword>TIME_CONSTANTS</keyword>
  226.       <keyword>TIME_DURATION</keyword>
  227.       <keyword>TIME</keyword>
  228.       <keyword>TIME_VALUE</keyword>
  229.     </context>
  230.  
  231.     <context id="void-value" style-ref="void-value">
  232.       <keyword>Void</keyword>
  233.     </context>
  234.  
  235.     <context id="boolean" style-ref="boolean">
  236.       <keyword>False</keyword>
  237.       <keyword>True</keyword>
  238.     </context>
  239.  
  240.     <context id="number" style-ref="decimal">
  241.       <match extended="true">
  242.       (?<![\w\.])
  243.       (([0-9]+)|([0-9]+\.[0-9]+([Ee][-]?[0-9]+)?))
  244.       (?![\w\.])
  245.       </match>
  246.     </context>
  247.  
  248.     <context id="hexadecimal" style-ref="hexadecimal">
  249.       <match extended="true">
  250.       (?<![\w\.])
  251.       \$[0-9a-fA-F]*
  252.       (?![\w\.])
  253.       </match>
  254.     </context>
  255.  
  256.     <context id="eiffel">
  257.       <include>
  258.         <context ref="single-quoted-string"/>
  259.         <context ref="double-quoted-string"/>
  260.         <context ref="line-comment"/>
  261.         <context ref="debug"/>
  262.         <context ref="assertion"/>
  263.         <context ref="keywords"/>
  264.         <context ref="predefined-variables"/>
  265.         <context ref="builtin-types"/>
  266.         <context ref="lib-eiffel-base"/>
  267.         <context ref="lib-eiffel-time"/>
  268.         <context ref="void-value"/>
  269.         <context ref="boolean"/>
  270.         <context ref="number"/>
  271.         <context ref="hexadecimal"/>
  272.       </include>
  273.     </context>
  274.  
  275.   </definitions>
  276. </language>
  277.